<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>output元素</title>
</head>
<body>
    <form oninput="x.value=parseInt(first_num.value)*parseInt(second_num.value)">
        <fieldset>
            <legend>请输入两个数字：</legend>
            <input type="text" id="first_num">X
            <input type="text" id="second_num">=
            <output name="x" for="first_num second_num"></output>
        </fieldset>
    </form>
</body>
</html>